﻿using Knlght.Service;
using Knlght.Web.Infrastructure.Menus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace Knlght.Web.Areas.Manage.Controllers
{
    public class HomeController : BaseAdminController
    {
        [MallAdminMenu("Home")]
        public ActionResult Index()
        {
            ViewBag.Model = GetUser();
            if (ViewBag.Model == null)
            {
                Session.Abandon();
                //删除Forms验证票证
                FormsAuthentication.SignOut();
                return RedirectToAction("Login", "Account");
            }
            return View();
        }

        public ActionResult Default()
        {
            return View();
        }
    }
}